/* A C++ Program to Multiply two Matrices. Divide And Conquer Algorithm

Code :
*/

#include <iostream.h>
#include <cstdio>
#include "cppexample.h"

extern "C" int cppexample(void);

 class Matrix
 {
    private:
       float matrix_a[3][3];
       float matrix_b[3][3];
       float matrix_c[3][3];

    public:

       void multiply_matrices( );
 };


void Matrix::multiply_matrices( )
 {
    for(int i=0;i<3;i++)
    {
       for(int j=0;j<3;j++)
       {
	  float value=0;
	  float sum=0;

	  for(int k=0;k<3;k++)
	  {
	     value=matrix_a[j][k]*matrix_b[k][j];
	     sum+=value;
	  }

	  matrix_c[i][j]=sum;
       }
    }
 }



 int cppexample(void)
 {

    Matrix Obj;

    Obj.multiply_matrices( );

    return 0;
 }



